// src/api/auth.ts
import request from './request';
import type { LoginRequest, LoginResponse, RegisterRequest } from '@/types/api';

export const loginApi = (data: LoginRequest): Promise<LoginResponse> => {
    return request({ url: '/api/auth/login', method: 'post', data });
};

export const registerApi = (data: RegisterRequest): Promise<string> => {
    return request({ url: '/api/auth/register', method: 'post', data });
};
